#pragma once
#include "Rect.h"
#include "FontTranslationTable.h"
#include "FontPtr.h"
#include "ImportExport.h"

namespace ja2{ namespace sgp
{
	class Settings;
	class VideoObjectManager;
	class ImageManager;

	//! Font manager.
	class FontManager : boost::noncopyable
	{
		// Constants
	private:
		//! Maximum fonts.
		static short const MAX_FONTS = 25;

		// Typedefs
	private:
		//! Vector of objects.
		typedef std::vector<Font> FontVector_t;

		// Attributes
	private:
		//! Image manager.
		ImageManager &m_ImageManager;
		//! Default pixel depth.
		std::uint_least8_t m_DefaultPixelDepth;
		//! Font destination region.
		Rect m_FontDestRegion;
		//! Font destination BPP.
		std::uint_least8_t m_FontDestinationBPP;
		//! Font destination pitch.
		std::uint_least32_t m_FontDestinationPitch;
		//! Font translation table used.
		FontTranslationTablePtr_t m_pTranslationTable;
		//! Large font.
		FontPtr_t m_pLarge;
		//! Small font.
		FontPtr_t m_pSmall;
		//! Small font.
		FontPtr_t m_pTiny;
		//! Small font.
		FontPtr_t m_pPoint12;
		//! Small font.
		FontPtr_t m_pClock;
		//! Small font.
		FontPtr_t m_pComp;
		//! Small font.
		FontPtr_t m_pCompSmall;
		//! Small font.
		FontPtr_t m_pRoman10;
		//! Small font.
		FontPtr_t m_pRoman12;
		//! Small font.
		FontPtr_t m_pSans14;
		//! Small font.
		FontPtr_t m_pArial10;
		//! Small font.
		FontPtr_t m_pArial14;
		//! Small font.
		FontPtr_t m_pArial10Bold;
		//! Small font.
		FontPtr_t m_pArial12;
		//! Small font.
		FontPtr_t m_pBlocky;
		//! Small font.
		FontPtr_t m_pBlocky2;
		//! Small font.
		FontPtr_t m_pArial12Fixed;
		//! Small font.
		FontPtr_t m_pArial16;
		//! Small font.
		FontPtr_t m_pBlockyNarrow;
		//! Small font.
		FontPtr_t m_pHumanist14;

		// Operations
	public:
		//! Load font.
		FontPtr_t load(boost::filesystem::path const &Path);

		// Construction/Destruction
	public:
		JA2_SGP_API FontManager(ImageManager &ImageManager_, std::uint_least8_t DefaultPixelDepth, Settings const &Settings_, FontTranslationTablePtr_t &&pTable);
	};
} /*sgp*/} /*ja2*/
